import request from '@/utils/request'

export default {
  login(data) {
    return request({
      url: '/login',
      method: 'POST',
      data
    })
  },
  register(data) {
    return request({
      url: '/register',
      method: 'POST',
      data
    })
  },
  getUserInfo() {
    return request({
      url: '/user/info',
      method: 'GET'
    })
  },
  updateUserInfo(data) {
    return request({
      url: '/user/info',
      method: 'PUT',
      data
    })
  },
  logout() {
    return request({
      url: '/logout',
      method: 'POST'
    })
  }
}
